home *** CD-ROM | disk | FTP | other *** search
/ How Many Bugs in a Box / How Many Bugs in a Box.cdr / bugs / act6b / 00020.ls < prev    next >
Encoding:
Text File  |  1995-03-28  |  1.1 KB  |  47 lines

  1. on mouseDown
  2.   global abug, TRIAL, whogetsit
  3.   set thisbug to 1 + ((the clickOn - 10) / 6)
  4.   set tsprite to (thisbug * 6) + 4
  5.   repeat with xxx = 0 to 5
  6.     set the foreColor of sprite (xxx + tsprite) to 250
  7.   end repeat
  8.   repeat while the stillDown
  9.     updateStage()
  10.   end repeat
  11.   repeat with xxx = 0 to 5
  12.     set the foreColor of sprite (xxx + tsprite) to 255
  13.   end repeat
  14.   updateStage()
  15.   if abug = thisbug then
  16.     set whogetsit to []
  17.     cleartherest(tsprite)
  18.     play frame "reward" & random(6)
  19.     animateit(thisbug)
  20.     go("bug" & random(4))
  21.   else
  22.     set nowblend to 80
  23.     set ptime to the timer
  24.     repeat while (the timer - ptime) < 60
  25.       set nowblend to 80 - (the timer - ptime)
  26.       repeat with xxx = 0 to 5
  27.         set the blend of sprite (xxx + tsprite) to nowblend
  28.       end repeat
  29.       updateStage()
  30.     end repeat
  31.     repeat with xxx = 0 to 5
  32.       set the visible of sprite (xxx + tsprite) to 0
  33.     end repeat
  34.     set TRIAL to TRIAL + 1
  35.     if TRIAL = 1 then
  36.       play frame "hint1"
  37.     else
  38.       if TRIAL = 2 then
  39.         play frame "hint2"
  40.       else
  41.         play frame "hint3"
  42.       end if
  43.     end if
  44.     updateStage()
  45.   end if
  46. end
  47.